package com.xxx.mch.domain.dto;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Objects;

/**
 * @author FengHaixin
 * @description 一句话描述该文件的用途
 * @date 2020-09-10
 */
@Setter
@Getter
@ToString (callSuper = true)
@ApiModel ("个人得分汇总")
public class PersonalScoreDto
{

    @ApiModelProperty ("id")
    private Integer id;

    @ApiModelProperty ("用户uid")
    private String uid;

    @ApiModelProperty ("定量分")
    @JSONField(name = "qualityScore")
    private BigDecimal allowanceScore;

    @ApiModelProperty ("确认状态：-1初始状态，用户未确认正确或不正确；0不正确；1正确")
    private Integer confirm;

    @ApiModelProperty ("申述理由")
    private String applyReason;

    @ApiModelProperty ("修正得分")
    private BigDecimal deltaScore;

    @ApiModelProperty ("审议答复")
    private String updateReason;

    @ApiModelProperty ("定性分")
    private BigDecimal determinationScore;

    /**
     * 没得实际意义，要最后查询的是根据权重计算才能得出总分
     */
    @ApiModelProperty ("总分")
    private BigDecimal totalScore;

    @ApiModelProperty ("本月奖金")
    private BigDecimal money;

    /**
     * 积分
     */
    @ApiModelProperty ("积分")
    private BigDecimal points;

    @ApiModelProperty ("本年度累计积分")
    private BigDecimal accumulativePoints;

    @ApiModelProperty ("分数锁定状态。1：表示锁定")
    private Integer lockStatus;


    public BigDecimal getDeltaScore()
    {
        return Objects.isNull(deltaScore) ? BigDecimal.ZERO : deltaScore;
    }
}
